< previous page page_351 next page >

Page 351
2. Double-click the Property Page icon, and a new Property Page object appears. Notice that it looks similar to a form designer.
3. Bring up the Properties window of the Property Page by pressing F4.
4. Change the Name property of the Property Page to CalcGeneral.
5. Change the Caption property of the Property Page to General. (The caption appears in the tab of the Property Page, which is not displayed in the design environment.)
After you create the new Property Page objects, they should appear in your Project Explorer window, as shown in Figure 15.7.
0351-01.jpg
Figure 15.7
Property Pages are separate
objects in an ActiveX control project.
Placing Controls on the Property Pages
Now that you have created the Property Page objects, you can add the controls you need to edit the properties of custom controls to which the Property Page objects will be attached. The types of controls to use are up to you. Usually, though, you'll use text boxes to represent text properties, check boxes to represent Boolean (true/false) properties, list boxes to represent properties with multiple settings, and so on. Follow these steps to add controls to the Property Pages you have created for the Calculator control:
1. Double-click the CalcGeneral object in the Project Explorer window to display the General Property Page.
lcontrols.gif2. Add three Label controls to the Property Page, using the following properties:
Name
Caption
lblCaption
Caption
lblBCaption
Button Caption
lblOperation
Operation

textbox.gif3. Add two TextBox controls, txtCaption and txtButtonCaption, to hold the control captions.
cbox.gif4. Add a ComboBox control, cmbOperation, to hold the operation types.
After adding all these controls, your General Property Page should look like the one shown in Figure 15.8.

 
< previous page page_351 next page >